home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-13
/
hexvw10.zip
/
HEXEDIT.DOC
< prev
next >
Wrap
Text File
|
1992-09-22
|
12KB
|
302 lines
================================
| HexEdit |
| |
| (The hexadecimal file editor) |
| Version 1.0 |
| |
| Instruction Manual |
================================
by:
John Jenkins
=== Introduction ===
How often have you tried to view and/or edit a binary data file, database,
or executable, only to have your favorite editor barf ? Now this is all
possible with Hexedit, the hexadecimal file editor.
=== Hexedit Requirements ===
Hexedit requires an IBM compatible with at least 256K to run. It runs
fastest when installed on a hard drive. The monitor type does not
matter. Hexedit is written in Turbo-C and has been tested on the
following computers:
8088-8 MGA MS-DOS 3.3 & MS-DOS 4.0
286-12 VGA MS-DOS 4.0 & MS-DOS 5.0
386-33 VGA MS-DOS 5.0
486-33 VGA MS-DOS 5.0
=== Hexedit Installation ===
To install Hexedit, you need only 150K of free disk space. Simply copy
the files on the distribution to the directory of your choice. There is
no set up or configuration required, simply plug and play.
=== Command Line Arguments ===
Hexedit requires no command line arguments, however, the name of the file(s)
that are to be edited/viewed can be specified here. If no arguments are
given, hexedit will state the no file was loaded in the filename field.
=== How to run Hexedit ===
When you execute hexedit with no command line arguments, you will be
presented with a screen that looks like that in Figure 1.
========================= BINARY FILE HEX EDITOR ==========================
Filename: ** NO FILE **
Command ( BCEOQRSW+-<>? ): RADIX: hex
No file to read from !!
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 0 ----------------
1 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1 ----------------
2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 2 ----------------
3 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3 ----------------
4 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 4 ----------------
5 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 5 ----------------
6 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 6 ----------------
7 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 7 ----------------
8 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 8 ----------------
9 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 9 ----------------
a -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- a ----------------
b -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- b ----------------
c -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- c ----------------
d -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- d ----------------
e -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- e ----------------
f -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- f ----------------
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
OFFSET:0 BLK#:0 BYTE#:0
#BYTES:0 #BLKS:0 BLKSZ:0
---------------------------------------------------------------------------
Figure 1 - Main Screen
Otherwise, a command such as:
hexedit main.c <RETURN>
will produce the screen in Figure 2.
========================= BINARY FILE HEX EDITOR ==========================
Filename: main.c
Command ( BCEOQRSW+-<>? ): RADIX: hex
Read [256] bytes from block [0].
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
0 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0 /***************
1 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 1 ****************
2 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2 ****************
3 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 3 ****************
4 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0a 2a 2a 4 *************.**
5 20 4d 61 69 6e 20 70 72 6f 67 72 61 6d 20 72 6f 5 Main program ro
6 75 74 69 6e 65 20 66 6f 72 20 74 68 65 20 62 69 6 utine for the bi
7 6e 61 72 79 2d 66 69 6c 65 20 68 65 78 2d 65 64 7 nary-file hex-ed
8 69 74 6f 72 2e 20 20 50 72 6f 67 72 61 6d 20 75 8 itor. Program u
9 73 65 73 20 74 68 65 20 20 2a 2a 0a 2a 2a 20 63 9 ses the **.** c
a 75 72 73 65 73 20 74 65 72 6d 69 6e 61 6c 20 68 a urses terminal h
b 61 6e 64 6c 69 6e 67 20 6c 69 62 72 61 72 79 20 b andling library
c 74 6f 20 64 69 73 70 6c 61 79 20 61 6e 64 20 6d c to display and m
d 6f 64 69 66 79 20 64 61 74 61 20 66 69 6c 65 73 d odify data files
e 2e 20 20 20 20 20 20 2a 2a 0a 2a 2a 2a 2a 2a 2a e . **.******
f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a f ****************
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
OFFSET:0 BLK#:0 BYTE#:0
#BYTES:928 #BLKS:a BLKSZ:100
--------------------------------------------------------------------------
Figure 2 - Main Screen with file
=== Sections of the Screen ===
The first region of importance is the second line. It shows the current
file that is being operated on. If there is no file, then the words
"** NO FILE **" will be displayed.
The next important screen region is line three (3), column 30. This is the
command area. Anytime the cursor is in this position, hexedit is in command
mode.
In addition to the command position, line three contains the current radix
display. In this region will be displayed the values: hex, dec, octal.
The next line is the status/input line. Anytime input is required, a prompt
will appear on this line. Any errors or exceptions will be displayed on
this line as well.
Lines 5 through 21 are the data display region. The region to the left is
the hexadecimal area, and the region to the right contains the ASCII
equivalent of the data. Unprintable characters are shown as a dot (.).
The last two lines are the file status line. The first of these two lines
contains the file position in bytes and block number. The last field in
this line is used during edit mode to show the block-offset. The next line
contain the file size in bytes and 256-byte blocks, and the block size
(which remains fixed at 256 bytes).
=== Command Synopsis ===
B = Set current block number
C = Cancel any edits done on the current block
E = Enter edit mode ESC = Ends edit mode
O = Open new file
Q = Quit hexedit
R = Set current radix
S = Search for data pattern
W = Write current block
+ = Move to next file
- = Move to previous file
< = Move to previous block
> = Move to next block
? = Display help window
=== Setting the current radix ===
The radix is used to display and obtain information from the user. By
default, all file information displayed is in hexadecimal (base 16).
When any input is asked for, it should be entered in the current radix.
Typing R when in command mode will display the prompt:
"Change radix to ? (xdo)"
The values that can be entered are:
H h = HEXADECIMAL
D d = DECIMAL
O o = OCTAL
=== Moving to a new block ===
There are a number of ways to move to a new block. The first manner
is to explicitly set the block using the B command. When in command
mode, typing B will display the prompt:
"Which block ?"
After entering the block number (in the current radix), press <RETURN>
and the specified block will be loaded if legal. Any problems will be
displayed on the error message line.
Alternate ways to change the current block are to use the < and > keys.
The < moves back one block, while > moves ahead one block.
=== Opening a new file ===
To open a new file for editing/viewing, type O and the prompt:
"Filename :"
will appear. Enter the file and press <RETURN>. The first block of the
file will be loaded and displayed.
=== Changing the current file ===
If more than one file is in the filelist, then using the + and -
keys, the current file may be switched between them.
=== Editing a block ===
To make changes to a block, press E and the cursor will move into the
data display areas. To move around, use the LEFT/RIGHT arrow keys to
move from nibble to nibble and the UP/DOWN arrow keys to move from row
to row.
After the edits are complete, press <ESC> to end the session.
Once edits have been made to a block, they must be saved or canceled
before any other operations are done.
=== Cancelling Edits Made ===
To cancel any unsaved edits made to the current block, press the C key.
=== Searching for data ===
One of the nicer features of hexedit is the ability to search for data
patterns. There are two type of patterns, hex and ASCII. To search for
a pattern, press the S key in command mode. The prompt:
"Data to find:"
will be displayed. To find a binary pattern, type in the hexadecimal
representation of the pattern with no spaces. Full bytes must be
specified. To find an ASCII pattern, start the pattern with a ". Any
data following will be taken as literal.
ie. Search for the pattern: "Hexedit is great" in ascii.
Data to find: "Hexedit is great<RETURN>
ie. Search for the pattern: "Hexedit" in binary.
Data to find: 48657865646974<RETURN>
=== Uploading to BBS ===
The author would appreciate any efforts to upload this program to all
your favorite bulletin boards and shareware pools.
=== Reporting any bugs ===
If you find anything you think might be a bug, please let me know. I
want to provide a quality program. Please note the configuration you
are running on, exactly what happened, what was done to cause it, and
any other helpful information.
=== Coming Soon ... ===
I am currently working on a Version 2.0 of Hexedit. In it, I am adding
the following features, as well as fixing any bugs found in 1.0.
1) Finding patterns across 256-byte block boundaries